<template>
	<view class="personal" >
		<personal-info :pages="pages" @change="change"> </personal-info>
		<tab></tab>
		<view class="" v-show="show==='作品'">
			<personal-list></personal-list>
		</view>
		<view class="" v-show="show==='喜欢'">
			<personal-list></personal-list>
		</view>
		<view class=""v-show="show==='动态'">
			<follow-list :list="list"></follow-list>
		</view>
	</view>
</template>

<script>
	import personalInfo from "../../components/personalInfo.vue";
	import tab from "../../components/tab.vue";
	import personalList from "../../components/personalList.vue";
	import followList from "../../components/followList.vue";
	export default {
		components:{
			tab,
			personalInfo,
			personalList,
			followList
		},
		data() {
			return {
				list:[],
				show:'作品',
				pages:'personal'
			}
		},
		methods: {
			getVideoInfo(){
				let that=this;
				uni.request({
					url:"http://localhost:8099/api/video",
					success: (res) => {
						that.list=res.data.list;
						console.log(that.list);
					}
				})
			},
			change(res){
				this.show=res;
				console.log(res);
			}
		},
		
		created() {
			this.getVideoInfo();
		}
	}
</script>

<style>
.personal{
	height: 100%;
	width: 100%;
	background-color: #000000;
}
</style>
